package com.ruoyi.garbage.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 挑战结果+详情记录对象 challenge_result
 *
 * @author 刘哲贤
 * @date 2023-01-07
 */
public class ChallengeResult extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 得分
     */
    @ExcelProperty(value = "得分")
    private Integer score;

    /**
     * 结果集
     */
    @ExcelProperty(value = "结果集")
    private String result;

    /**
     * 时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "时间")
    private Date times;

    /**
     * $column.columnComment
     */
    @ExcelProperty(value = "${comment}")
    private String userName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Date getTimes() {
        return times;
    }

    public void setTimes(Date times) {
        this.times = times;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("score", getScore())
                .append("result", getResult())
                .append("times", getTimes())
                .append("userName", getUserName())
                .toString();
    }
}
